/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright Â© 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */
/*	
 *	jQuery carouFredSel 5.5.0
 *	Demo's and documentation:
 *	caroufredsel.frebsite.nl
 *	
 *	Copyright (c) 2012 Fred Heusschen
 *	www.frebsite.nl
 *
 *	Dual licensed under the MIT and GPL licenses.
 *	http://en.wikipedia.org/wiki/MIT_License
 *	http://en.wikipedia.org/wiki/GNU_General_Public_License
 */


eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(I($){8($.1R.1K)J;$.1R.1K=I(y,z){8(1i.V==0){1c(M,\'5O 4C 6x 1o "\'+1i.3Y+\'".\');J 1i}8(1i.V>1){J 1i.1P(I(){$(1i).1K(y,z)})}F A=1i,$19=1i[0];8(A.1q(\'4t\')){F B=A.1A(\'6a\');A.X(\'68\',M)}Q{F B=O}A.44=I(o,b,c){o=4p($19,o);8(o.1c){H.1c=o.1c;1c(H,\'6w "1c" 7v 7d 73 6R 3J 5B 6B 4v-1k.\')}F e=[\'G\',\'1m\',\'T\',\'17\',\'1a\',\'1b\'];1o(F a=0,l=e.V;a<l;a++){o[e[a]]=4p($19,o[e[a]])}8(K o.1m==\'14\'){8(o.1m<=50)o.1m={\'G\':o.1m};Q o.1m={\'1j\':o.1m}}Q{8(K o.1m==\'1l\')o.1m={\'1I\':o.1m}}8(K o.G==\'14\')o.G={\'P\':o.G};Q 8(o.G==\'1d\')o.G={\'P\':o.G,\'S\':o.G,\'1u\':o.G};8(K o.G!=\'1k\')o.G={};8(b)2y=$.26(M,{},$.1R.1K.4x,o);7=$.26(M,{},$.1R.1K.4x,o);8(K 7.G.12!=\'1k\')7.G.12={};8(7.G.2K==0&&K c==\'14\'){7.G.2K=c}C.4A=(7.2L);C.2r=(7.2r==\'4E\'||7.2r==\'1s\')?\'1a\':\'17\';F f=[[\'S\',\'3c\',\'27\',\'1u\',\'5D\',\'2Z\',\'1s\',\'32\',\'1E\',0,1,2,3],[\'1u\',\'5D\',\'2Z\',\'S\',\'3c\',\'27\',\'32\',\'1s\',\'3V\',3,2,1,0]];F g=f[0].V,5G=(7.2r==\'2U\'||7.2r==\'1s\')?0:1;7.d={};1o(F d=0;d<g;d++){7.d[f[0][d]]=f[5G][d]}F h=A.11();1x(K 7.G.P){W\'1k\':7.G.12.2M=7.G.P.2M;7.G.12.2i=7.G.P.2i;7.G.P=O;18;W\'1l\':8(7.G.P==\'1d\'){7.G.12.1d=M}Q{7.G.12.2p=7.G.P}7.G.P=O;18;W\'I\':7.G.12.2p=7.G.P;7.G.P=O;18}8(K 7.G.1v==\'1y\'){7.G.1v=(h.1v(\':2P\').V>0)?\':P\':\'*\'}8(7[7.d[\'S\']]==\'T\'){7[7.d[\'S\']]=3C(h,7,\'27\')}8(4n(7[7.d[\'S\']])&&!7.2L){7[7.d[\'S\']]=3Z(3g($1D.3e(),7,\'3c\'),7[7.d[\'S\']]);C.4A=M}8(7[7.d[\'1u\']]==\'T\'){7[7.d[\'1u\']]=3C(h,7,\'2Z\')}8(!7.G[7.d[\'S\']]){8(7.2L){1c(M,\'6k a \'+7.d[\'S\']+\' 1o 5B G!\');7.G[7.d[\'S\']]=3C(h,7,\'27\')}Q{7.G[7.d[\'S\']]=(5p(h,7,\'27\'))?\'1d\':h[7.d[\'27\']](M)}}8(!7.G[7.d[\'1u\']]){7.G[7.d[\'1u\']]=(5p(h,7,\'2Z\'))?\'1d\':h[7.d[\'2Z\']](M)}8(!7[7.d[\'1u\']]){7[7.d[\'1u\']]=7.G[7.d[\'1u\']]}8(!7.G.P&&!7.2L){8(7.G[7.d[\'S\']]==\'1d\'){7.G.12.1d=M}8(!7.G.12.1d){8(K 7[7.d[\'S\']]==\'14\'){7.G.P=1O.35(7[7.d[\'S\']]/7.G[7.d[\'S\']])}Q{F i=3g($1D.3e(),7,\'3c\');7.G.P=1O.35(i/7.G[7.d[\'S\']]);7[7.d[\'S\']]=7.G.P*7.G[7.d[\'S\']];8(!7.G.12.2p)7.1B=O}8(7.G.P==\'6Z\'||7.G.P<1){1c(M,\'2b a 4q 14 3T P G: 6k 3J "1d".\');7.G.12.1d=M}}}8(!7[7.d[\'S\']]){7[7.d[\'S\']]=\'1d\';8(!7.2L&&7.G.1v==\'*\'&&!7.G.12.1d&&7.G[7.d[\'S\']]!=\'1d\'){7[7.d[\'S\']]=7.G.P*7.G[7.d[\'S\']];7.1B=O}}8(7.G.12.1d){7.3S=(7[7.d[\'S\']]==\'1d\')?3g($1D.3e(),7,\'3c\'):7[7.d[\'S\']];8(7.1B===O){7[7.d[\'S\']]=\'1d\'}7.G.P=2J(h,7,0)}Q 8(7.G.1v!=\'*\'){7.G.12.4c=7.G.P;7.G.P=3R(h,7,0)}8(K 7.1B==\'1y\'){7.1B=(7[7.d[\'S\']]==\'1d\')?O:\'5r\'}7.G.P=2N(7.G.P,7,7.G.12.2p,$19);7.G.12.2q=7.G.P;7.1t=O;8(7.2L){8(!7.G.12.2M)7.G.12.2M=7.G.P;8(!7.G.12.2i)7.G.12.2i=7.G.P;7.1B=O;7.1h=[0,0,0,0];F j=$1D.1W(\':P\');8(j)$1D.3f();F k=3Z(3g($1D.3e(),7,\'3c\'),7[7.d[\'S\']]);8(K 7[7.d[\'S\']]==\'14\'&&k<7[7.d[\'S\']]){k=7[7.d[\'S\']]}8(j)$1D.3j();F m=5k(1O.2O(k/7.G[7.d[\'S\']]),7.G.12);8(m>h.V){m=h.V}F n=1O.35(k/m),5g=7[7.d[\'1u\']],69=4n(5g);h.1P(I(){F a=$(1i),5e=n-66(a,7,\'72\');a[7.d[\'S\']](5e);8(69){a[7.d[\'1u\']](3Z(5e,5g))}});7.G.P=m;7.G[7.d[\'S\']]=n;7[7.d[\'S\']]=m*n}Q{7.1h=5T(7.1h);8(7.1B==\'32\')7.1B=\'1s\';8(7.1B==\'5a\')7.1B=\'2U\';1x(7.1B){W\'5r\':W\'1s\':W\'2U\':8(7[7.d[\'S\']]!=\'1d\'){F p=4l(3p(h,7),7);7.1t=M;7.1h[7.d[1]]=p[1];7.1h[7.d[3]]=p[0]}18;2z:7.1B=O;7.1t=(7.1h[0]==0&&7.1h[1]==0&&7.1h[2]==0&&7.1h[3]==0)?O:M;18}}8(K 7.2t==\'1r\'&&7.2t)7.2t=\'7D\'+A.6L(\'6Q\');8(K 7.G.3r!=\'14\')7.G.3r=7.G.P;8(K 7.1m.1j!=\'14\')7.1m.1j=5N;8(K 7.1m.G==\'1y\')7.1m.G=(7.G.12.1d||7.G.1v!=\'*\')?\'P\':7.G.P;7.T=3w($19,7.T,\'T\');7.17=3w($19,7.17);7.1a=3w($19,7.1a);7.1b=3w($19,7.1b,\'1b\');7.T=$.26(M,{},7.1m,7.T);7.17=$.26(M,{},7.1m,7.17);7.1a=$.26(M,{},7.1m,7.1a);7.1b=$.26(M,{},7.1m,7.1b);8(K 7.1b.48!=\'1r\')7.1b.48=O;8(K 7.1b.34!=\'I\'&&7.1b.34!==O)7.1b.34=$.1R.1K.5M;8(K 7.T.1G!=\'1r\')7.T.1G=M;8(K 7.T.56!=\'14\')7.T.56=0;8(K 7.T.3W==\'1y\')7.T.3W=M;8(K 7.T.55!=\'1r\')7.T.55=M;8(K 7.T.3q!=\'14\')7.T.3q=(7.T.1j<10)?7l:7.T.1j*5;8(7.2j){7.2j=4Z(7.2j)}8(H.1c){1c(H,\'3n S: \'+7.S);1c(H,\'3n 1u: \'+7.1u);8(7.3S)1c(H,\'71 \'+7.d[\'S\']+\': \'+7.3S);1c(H,\'5A 76: \'+7.G.S);1c(H,\'5A 7i: \'+7.G.1u);1c(H,\'4i 3T G P: \'+7.G.P);8(7.T.1G)1c(H,\'4i 3T G 4Y 6A: \'+7.T.G);8(7.17.Y)1c(H,\'4i 3T G 4Y 4X: \'+7.17.G);8(7.1a.Y)1c(H,\'4i 3T G 4Y 5x: \'+7.1a.G)}};A.5t=I(){A.1q(\'4t\',M);F a={\'4U\':A.16(\'4U\'),\'4T\':A.16(\'4T\'),\'3K\':A.16(\'3K\'),\'32\':A.16(\'32\'),\'2U\':A.16(\'2U\'),\'5a\':A.16(\'5a\'),\'1s\':A.16(\'1s\'),\'S\':A.16(\'S\'),\'1u\':A.16(\'1u\'),\'4R\':A.16(\'4R\'),\'1E\':A.16(\'1E\'),\'3V\':A.16(\'3V\'),\'4P\':A.16(\'4P\')};1x(a.3K){W\'4N\':F b=\'4N\';18;W\'5X\':F b=\'5X\';18;2z:F b=\'6S\'}$1D.16(a).16({\'6T\':\'2P\',\'3K\':b});A.1q(\'5V\',a).16({\'4U\':\'1s\',\'4T\':\'4g\',\'3K\':\'4N\',\'32\':0,\'1s\':0,\'4R\':0,\'1E\':0,\'3V\':0,\'4P\':0});8(7.1t){A.11().1P(I(){F m=2o($(1i).16(7.d[\'1E\']));8(2s(m))m=0;$(1i).1q(\'1V\',m)})}};A.5S=I(){A.4L();A.13(L(\'4J\',H),I(e,a){e.1e();8(!C.22){8(7.T.Y){7.T.Y.31(2l(\'43\',H))}}C.22=M;8(7.T.1G){7.T.1G=O;A.X(L(\'2X\',H),a)}J M});A.13(L(\'4I\',H),I(e){e.1e();8(C.1U){3P(R)}J M});A.13(L(\'2X\',H),I(e,a,b){e.1e();1F=3d(1F);8(a&&C.1U){R.22=M;F c=2C()-R.2Q;R.1j-=c;8(R.1p)R.1p.1j-=c;8(R.1Q)R.1Q.1j-=c;3P(R,O)}8(!C.1Y&&!C.1U){8(b)1F.3v+=2C()-1F.2Q}8(!C.1Y){8(7.T.Y){7.T.Y.31(2l(\'6s\',H))}}C.1Y=M;8(7.T.6d){F d=7.T.3q-1F.3v,3G=3F-1O.2O(d*3F/7.T.3q);7.T.6d.1z($19,3G,d)}J M});A.13(L(\'1G\',H),I(e,b,c,d){e.1e();1F=3d(1F);F v=[b,c,d],t=[\'1l\',\'14\',\'1r\'],a=2Y(v,t);F b=a[0],c=a[1],d=a[2];8(b!=\'17\'&&b!=\'1a\')b=C.2r;8(K c!=\'14\')c=0;8(K d!=\'1r\')d=O;8(d){C.22=O;7.T.1G=M}8(!7.T.1G){e.23();J 1c(H,\'3n 43: 2b 2R.\')}8(C.1Y){8(7.T.Y){7.T.Y.2v(2l(\'43\',H));7.T.Y.2v(2l(\'6s\',H))}}C.1Y=O;1F.2Q=2C();F f=7.T.3q+c;3x=f-1F.3v;3G=3F-1O.2O(3x*3F/f);1F.T=7a(I(){8(7.T.5Q){7.T.5Q.1z($19,3G,3x)}8(C.1U){A.X(L(\'1G\',H),b)}Q{A.X(L(b,H),7.T)}},3x);8(7.T.5I){7.T.5I.1z($19,3G,3x)}J M});A.13(L(\'2H\',H),I(e){e.1e();8(R.22){R.22=O;C.1Y=O;C.1U=M;R.2Q=2C();2f(R)}Q{A.X(L(\'1G\',H))}J M});A.13(L(\'17\',H)+\' \'+L(\'1a\',H),I(e,b,f,g){e.1e();8(C.22||A.1W(\':2P\')){e.23();J 1c(H,\'3n 43 6I 2P: 2b 2R.\')}8(7.G.3r>=N.U){e.23();J 1c(H,\'2b 5F G (\'+N.U+\', \'+7.G.3r+\' 5E): 2b 2R.\')}F v=[b,f,g],t=[\'1k\',\'14/1l\',\'I\'],a=2Y(v,t);F b=a[0],f=a[1],g=a[2];F h=e.4w.3U(H.3o.3B.V);8(K b!=\'1k\'||b==2c)b=7[h];8(K g==\'I\')b.24=g;8(K f!=\'14\'){8(7.G.1v!=\'*\'){f=\'P\'}Q{F i=[f,b.G,7[h].G];1o(F a=0,l=i.V;a<l;a++){8(K i[a]==\'14\'||i[a]==\'5y\'||i[a]==\'P\'){f=i[a];18}}}1x(f){W\'5y\':e.23();J A.1A(h+\'7j\',[b,g]);18;W\'P\':8(!7.G.12.1d&&7.G.1v==\'*\'){f=7.G.P}18}}8(R.22){A.X(L(\'2H\',H));A.X(L(\'3k\',H),[h,[b,f,g]]);e.23();J 1c(H,\'3n 7o 2R.\')}8(b.1j>0){8(C.1U){8(b.3k)A.X(L(\'3k\',H),[h,[b,f,g]]);e.23();J 1c(H,\'3n 7y 2R.\')}}8(b.4u&&!b.4u.1z($19)){e.23();J 1c(H,\'6y "4u" 6z O.\')}1F.3v=0;A.X(\'6r\'+h,[b,f]);8(7.2j){F s=7.2j,c=[b,f];1o(F j=0,l=s.V;j<l;j++){F d=h;8(!s[j][1])c[0]=s[j][0].1A(\'6c\',h);8(!s[j][2])d=(d==\'17\')?\'1a\':\'17\';c[1]=f+s[j][3];s[j][0].X(\'6r\'+d,c)}}J M});A.13(L(\'6K\',H,O),I(e,f,g){e.1e();F h=A.11();8(!7.1N){8(N.Z==0){8(7.3h){A.X(L(\'1a\',H),N.U-1)}J e.23()}}8(7.1t)1M(h,7);8(K g!=\'14\'){8(7.G.12.1d){g=47(h,7,N.U-1)}Q 8(7.G.1v!=\'*\'){F i=(K f.G==\'14\')?f.G:4V(A,7);g=6t(h,7,N.U-1,i)}Q{g=7.G.P}g=4b(g,7,f.G,$19)}8(!7.1N){8(N.U-g<N.Z){g=N.U-N.Z}}7.G.12.2q=7.G.P;8(7.G.12.1d){F j=2J(h,7,N.U-g);8(7.G.P+g<=j&&g<N.U){g++;j=2J(h,7,N.U-g)}7.G.P=2N(j,7,7.G.12.2p,$19)}Q 8(7.G.1v!=\'*\'){F j=3R(h,7,N.U-g);7.G.P=2N(j,7,7.G.12.2p,$19)}8(7.1t)1M(h,7,M);8(g==0){e.23();J 1c(H,\'0 G 3J 1m: 2b 2R.\')}1c(H,\'6m \'+g+\' G 4X.\');N.Z+=g;1Z(N.Z>=N.U){N.Z-=N.U}8(!7.1N){8(N.Z==0&&f.4d)f.4d.1z($19);8(!7.3h)2T(7,N.Z,H)}A.11().1g(N.U-g,N.U).7g(A);8(N.U<7.G.P+g){A.11().1g(0,(7.G.P+g)-N.U).4f(M).3O(A)}F h=A.11(),2n=6l(h,7,g),1T=6b(h,7),28=h.1L(g-1),2d=2n.2I(),2x=1T.2I();8(7.1t)1M(h,7);8(7.1B){F p=4l(1T,7),k=p[0],2k=p[1]}Q{F k=0,2k=0}F l=(k<0)?7.1h[7.d[3]]:0;8(f.1H==\'5z\'&&7.G.P<g){F m=h.1g(7.G.12.2q,g),4m=7.G[7.d[\'S\']];m.1P(I(){F a=$(1i);a.1q(\'4j\',a.1W(\':2P\')).3f()});7.G[7.d[\'S\']]=\'1d\'}Q{F m=O}F n=36(h.1g(0,g),7,\'S\'),29=4a(2E(1T,7,M),7,!7.1t);8(m)7.G[7.d[\'S\']]=4m;8(7.1t){1M(h,7,M);8(2k>=0){1M(2d,7,7.1h[7.d[1]])}1M(28,7,7.1h[7.d[3]])}8(7.1B){7.1h[7.d[1]]=2k;7.1h[7.d[3]]=k}F o={},1w=f.1j;8(f.1H==\'4g\')1w=0;Q 8(1w==\'T\')1w=7.1m.1j/7.1m.G*g;Q 8(1w<=0)1w=0;Q 8(1w<10)1w=n/1w;R=20(1w,f.1I);8(7[7.d[\'S\']]==\'1d\'||7[7.d[\'1u\']]==\'1d\'){R.1f.1n([$1D,29])}8(7.1t){F q=7.1h[7.d[3]];8(2x.4s(28).V){F r={};r[7.d[\'1E\']]=28.1q(\'1V\');8(k<0)28.16(r);Q R.1f.1n([28,r])}8(2x.4s(2d).V){F s={};s[7.d[\'1E\']]=2d.1q(\'1V\');R.1f.1n([2d,s])}8(2k>=0){F t={};t[7.d[\'1E\']]=2x.1q(\'1V\')+7.1h[7.d[1]];R.1f.1n([2x,t])}}Q{F q=0}o[7.d[\'1s\']]=q;F u=[2n,1T,29,1w];8(f.2a)f.2a.3E($19,u);1X.2a=3z(1X.2a,$19,u);1x(f.1H){W\'2u\':W\'2e\':W\'2G\':W\'2h\':R.1p=20(R.1j,R.1I);R.1Q=20(R.1j,R.1I);R.1j=0;18}1x(f.1H){W\'2e\':W\'2G\':W\'2h\':F v=A.4f().3O($1D);18}1x(f.1H){W\'2h\':v.11().1g(0,g).1J();W\'2e\':W\'2G\':v.11().1g(7.G.P).1J();18}1x(f.1H){W\'2u\':R.1p.1f.1n([A,{\'2g\':0}]);18;W\'2e\':v.16({\'2g\':0});R.1p.1f.1n([A,{\'S\':\'+=0\'},I(){v.1J()}]);R.1Q.1f.1n([v,{\'2g\':1}]);18;W\'2G\':R=4y(R,A,v,7,M);18;W\'2h\':R=4z(R,A,v,7,M,g);18}F w=I(){F b=7.G.P+g-N.U;8(b>0){A.11().1g(N.U).1J();2n=A.11().1g(N.U-(g-b)).3X().6e(A.11().1g(0,b).3X())}8(m){m.1P(I(){F a=$(1i);8(!a.1q(\'4j\'))a.3j()})}8(7.1t){F c=A.11().1L(7.G.P+g-1);c.16(7.d[\'1E\'],c.1q(\'1V\'))}R.1f=[];8(R.1p)R.1p=20(R.4B,R.1I);F d=I(){1x(f.1H){W\'2u\':W\'2e\':A.16(\'1v\',\'\');18}R.1Q=20(0,2c);C.1U=O;F a=[2n,1T,29];8(f.24)f.24.3E($19,a);1X.24=3z(1X.24,$19,a);8(1S.V){A.X(L(1S[0][0],H),1S[0][1]);1S.6p()}8(!C.1Y)A.X(L(\'1G\',H))};1x(f.1H){W\'2u\':R.1p.1f.1n([A,{\'2g\':1},d]);2f(R.1p);18;W\'2h\':R.1p.1f.1n([A,{\'S\':\'+=0\'},d]);2f(R.1p);18;2z:d();18}};R.1f.1n([A,o,w]);C.1U=M;A.16(7.d[\'1s\'],-(n-l));1F=3d(1F);2f(R);4D(7.2t,A.1A(L(\'3H\',H)));A.X(L(\'2B\',H),[O,29]);J M});A.13(L(\'6V\',H,O),I(e,f,g){e.1e();F h=A.11();8(!7.1N){8(N.Z==7.G.P){8(7.3h){A.X(L(\'17\',H),N.U-1)}J e.23()}}8(7.1t)1M(h,7);8(K g!=\'14\'){8(7.G.1v!=\'*\'){F i=(K f.G==\'14\')?f.G:4V(A,7);g=5w(h,7,0,i)}Q{g=7.G.P}g=4b(g,7,f.G,$19)}F j=(N.Z==0)?N.U:N.Z;8(!7.1N){8(7.G.12.1d){F k=2J(h,7,g),i=47(h,7,j-1)}Q{F k=7.G.P,i=7.G.P}8(g+k>j){g=j-i}}7.G.12.2q=7.G.P;8(7.G.12.1d){F k=4F(h,7,g,j);1Z(7.G.P-g>=k&&g<N.U){g++;k=4F(h,7,g,j)}7.G.P=2N(k,7,7.G.12.2p,$19)}Q 8(7.G.1v!=\'*\'){F k=3R(h,7,g);7.G.P=2N(k,7,7.G.12.2p,$19)}8(7.1t)1M(h,7,M);8(g==0){e.23();J 1c(H,\'0 G 3J 1m: 2b 2R.\')}1c(H,\'6m \'+g+\' G 5x.\');N.Z-=g;1Z(N.Z<0){N.Z+=N.U}8(!7.1N){8(N.Z==7.G.P&&f.4d)f.4d.1z($19);8(!7.3h)2T(7,N.Z,H)}8(N.U<7.G.P+g){A.11().1g(0,(7.G.P+g)-N.U).4f(M).3O(A)}F h=A.11(),2n=4G(h,7),1T=4H(h,7,g),28=h.1L(g-1),2d=2n.2I(),2x=1T.2I();8(7.1t)1M(h,7);8(7.1B){F p=4l(1T,7),l=p[0],2k=p[1]}Q{F l=0,2k=0}8(f.1H==\'5z\'&&7.G.12.2q<g){F m=h.1g(7.G.12.2q,g),4m=7.G[7.d[\'S\']];m.1P(I(){F a=$(1i);a.1q(\'4j\',a.1W(\':2P\')).3f()});7.G[7.d[\'S\']]=\'1d\'}Q{F m=O}F n=36(h.1g(0,g),7,\'S\'),29=4a(2E(1T,7,M),7,!7.1t);8(m)7.G[7.d[\'S\']]=4m;8(7.1B){8(7.1h[7.d[1]]<0){7.1h[7.d[1]]=0}}8(7.1t){1M(h,7,M);1M(2d,7,7.1h[7.d[1]])}8(7.1B){7.1h[7.d[1]]=2k;7.1h[7.d[3]]=l}F o={},1w=f.1j;8(f.1H==\'4g\')1w=0;Q 8(1w==\'T\')1w=7.1m.1j/7.1m.G*g;Q 8(1w<=0)1w=0;Q 8(1w<10)1w=n/1w;R=20(1w,f.1I);8(7[7.d[\'S\']]==\'1d\'||7[7.d[\'1u\']]==\'1d\'){R.1f.1n([$1D,29])}8(7.1t){F q=2x.1q(\'1V\');8(2k>=0){q+=7.1h[7.d[1]]}2x.16(7.d[\'1E\'],q);8(28.4s(2d).V){F r={};r[7.d[\'1E\']]=2d.1q(\'1V\');R.1f.1n([2d,r])}F s=28.1q(\'1V\');8(l>=0){s+=7.1h[7.d[3]]}F t={};t[7.d[\'1E\']]=s;R.1f.1n([28,t])}o[7.d[\'1s\']]=-n;8(l<0){o[7.d[\'1s\']]+=l}F u=[2n,1T,29,1w];8(f.2a)f.2a.3E($19,u);1X.2a=3z(1X.2a,$19,u);1x(f.1H){W\'2u\':W\'2e\':W\'2G\':W\'2h\':R.1p=20(R.1j,R.1I);R.1Q=20(R.1j,R.1I);R.1j=0;18}1x(f.1H){W\'2e\':W\'2G\':W\'2h\':F v=A.4f().3O($1D);18}1x(f.1H){W\'2h\':v.11().1g(7.G.12.2q).1J();18;W\'2e\':W\'2G\':v.11().1g(0,g).1J();v.11().1g(7.G.P).1J();18}1x(f.1H){W\'2u\':R.1p.1f.1n([A,{\'2g\':0}]);18;W\'2e\':v.16({\'2g\':0});R.1p.1f.1n([A,{\'S\':\'+=0\'},I(){v.1J()}]);R.1Q.1f.1n([v,{\'2g\':1}]);18;W\'2G\':R=4y(R,A,v,7,O);18;W\'2h\':R=4z(R,A,v,7,O,g);18}F w=I(){F b=7.G.P+g-N.U,5C=(7.1t)?7.1h[7.d[3]]:0;A.16(7.d[\'1s\'],5C);8(b>0){A.11().1g(N.U).1J()}F c=A.11().1g(0,g).3O(A).2I();8(b>0){1T=3p(h,7)}8(m){m.1P(I(){F a=$(1i);8(!a.1q(\'4j\'))a.3j()})}8(7.1t){8(N.U<7.G.P+g){F d=A.11().1L(7.G.P-1);d.16(7.d[\'1E\'],d.1q(\'1V\')+7.1h[7.d[3]])}c.16(7.d[\'1E\'],c.1q(\'1V\'))}R.1f=[];8(R.1p)R.1p=20(R.4B,R.1I);F e=I(){1x(f.1H){W\'2u\':W\'2e\':A.16(\'1v\',\'\');18}R.1Q=20(0,2c);C.1U=O;F a=[2n,1T,29];8(f.24)f.24.3E($19,a);1X.24=3z(1X.24,$19,a);8(1S.V){A.X(L(1S[0][0],H),1S[0][1]);1S.6p()}8(!C.1Y)A.X(L(\'1G\',H))};1x(f.1H){W\'2u\':R.1p.1f.1n([A,{\'2g\':1},e]);2f(R.1p);18;W\'2h\':R.1p.1f.1n([A,{\'S\':\'+=0\'},e]);2f(R.1p);18;2z:e();18}};R.1f.1n([A,o,w]);C.1U=M;1F=3d(1F);2f(R);4D(7.2t,A.1A(L(\'3H\',H)));A.X(L(\'2B\',H),[O,29]);J M});A.13(L(\'2W\',H),I(e,b,c,d,f,g,h){e.1e();F v=[b,c,d,f,g,h],t=[\'1l/14/1k\',\'14\',\'1r\',\'1k\',\'1l\',\'I\'],a=2Y(v,t);F f=a[3],g=a[4],h=a[5];b=3u(a[0],a[1],a[2],N,A);8(b==0)J;8(K f!=\'1k\')f=O;8(C.1U){8(K f!=\'1k\'||f.1j>0)J O}8(g!=\'17\'&&g!=\'1a\'){8(7.1N){8(b<=N.U/2)g=\'1a\';Q g=\'17\'}Q{8(N.Z==0||N.Z>b)g=\'1a\';Q g=\'17\'}}8(g==\'17\')b=N.U-b;A.X(L(g,H),[f,b,h]);J M});A.13(L(\'7h\',H),I(e,a,b){e.1e();F c=A.1A(L(\'3Q\',H));J A.1A(L(\'4K\',H),[c-1,a,\'17\',b])});A.13(L(\'7k\',H),I(e,a,b){e.1e();F c=A.1A(L(\'3Q\',H));J A.1A(L(\'4K\',H),[c+1,a,\'1a\',b])});A.13(L(\'4K\',H),I(e,a,b,c,d){e.1e();8(K a!=\'14\')a=A.1A(L(\'3Q\',H));F f=7.1b.G||7.G.P,2i=1O.35(N.U/f)-1;8(a<0)a=2i;8(a>2i)a=0;J A.1A(L(\'2W\',H),[a*f,0,M,b,c,d])});A.13(L(\'5J\',H),I(e,s){e.1e();8(s)s=3u(s,0,M,N,A);Q s=0;s+=N.Z;8(s!=0){1Z(s>N.U)s-=N.U;A.7m(A.11().1g(s,N.U))}J M});A.13(L(\'2j\',H),I(e,s){e.1e();8(s)s=4Z(s);Q 8(7.2j)s=7.2j;Q J 1c(H,\'5O 7n 3J 2j.\');F n=A.1A(L(\'3H\',H)),x=M;1o(F j=0,l=s.V;j<l;j++){8(!s[j][0].1A(L(\'2W\',H),[n,s[j][3],M])){x=O}}J x});A.13(L(\'3k\',H),I(e,a,b){e.1e();8(K a==\'I\'){a.1z($19,1S)}Q 8(2V(a)){1S=a}Q 8(K a!=\'1y\'){1S.1n([a,b])}J 1S});A.13(L(\'7w\',H),I(e,b,c,d,f){e.1e();F v=[b,c,d,f],t=[\'1l/1k\',\'1l/14/1k\',\'1r\',\'14\'],a=2Y(v,t);F b=a[0],c=a[1],d=a[2],f=a[3];8(K b==\'1k\'&&K b.3b==\'1y\')b=$(b);8(K b==\'1l\')b=$(b);8(K b!=\'1k\'||K b.3b==\'1y\'||b.V==0)J 1c(H,\'2b a 4q 1k.\');8(K c==\'1y\')c=\'4e\';8(7.1t){b.1P(I(){F m=2o($(1i).16(7.d[\'1E\']));8(2s(m))m=0;$(1i).1q(\'1V\',m)})}F g=c,3N=\'3N\';8(c==\'4e\'){8(d){8(N.Z==0){c=N.U-1;3N=\'61\'}Q{c=N.Z;N.Z+=b.V}8(c<0)c=0}Q{c=N.U-1;3N=\'61\'}}Q{c=3u(c,f,d,N,A)}8(g!=\'4e\'&&!d){8(c<N.Z)N.Z+=b.V}8(N.Z>=N.U)N.Z-=N.U;F h=A.11().1L(c);8(h.V){h[3N](b)}Q{A.65(b)}N.U=A.11().V;F i=A.1A(\'4M\');3M(7,N.U,H);2T(7,N.Z,H);A.X(L(\'4O\',H));A.X(L(\'2B\',H),[M,i]);J M});A.13(L(\'6D\',H),I(e,b,c,d){e.1e();F v=[b,c,d],t=[\'1l/14/1k\',\'1r\',\'14\'],a=2Y(v,t);F b=a[0],c=a[1],d=a[2];8(K b==\'1y\'||b==\'4e\'){A.11().2I().1J()}Q{b=3u(b,d,c,N,A);F f=A.11().1L(b);8(f.V){8(b<N.Z)N.Z-=f.V;f.1J()}}N.U=A.11().V;F g=A.1A(\'4M\');3M(7,N.U,H);2T(7,N.Z,H);A.X(L(\'2B\',H),[M,g]);J M});A.13(L(\'2a\',H)+\' \'+L(\'24\',H),I(e,a){e.1e();F b=e.4w.3U(H.3o.3B.V);8(2V(a))1X[b]=a;8(K a==\'I\')1X[b].1n(a);J 1X[b]});A.13(L(\'6a\',H,O),I(e,a){e.1e();J A.1A(L(\'3H\',H),a)});A.13(L(\'3H\',H),I(e,a){e.1e();8(N.Z==0)F b=0;Q F b=N.U-N.Z;8(K a==\'I\')a.1z($19,b);J b});A.13(L(\'3Q\',H),I(e,a){e.1e();F b=7.1b.G||7.G.P;F c=1O.2O(N.U/b-1);8(N.Z==0)F d=0;Q 8(N.Z<N.U%b)F d=0;Q 8(N.Z==b&&!7.1N)F d=c;Q F d=1O.6E((N.U-N.Z)/b);8(d<0)d=0;8(d>c)d=c;8(K a==\'I\')a.1z($19,d);J d});A.13(L(\'6G\',H),I(e,a){e.1e();$i=3p(A.11(),7);8(K a==\'I\')a.1z($19,$i);J $i});A.13(L(\'1g\',H),I(e,f,l,b){e.1e();F v=[f,l,b],t=[\'14\',\'14\',\'I\'],a=2Y(v,t);f=(K a[0]==\'14\')?a[0]:0,l=(K a[1]==\'14\')?a[1]:N.U,b=a[2];f+=N.Z;l+=N.Z;1Z(f>N.U){f-=N.U}1Z(l>N.U){l-=N.U}1Z(f<0){f+=N.U}1Z(l<0){l+=N.U}F c=A.11();8(l>f){F d=c.1g(f,l)}Q{F d=c.1g(f,N.U).3X().6e(c.1g(0,l).3X())}8(K b==\'I\')b.1z($19,d);J d});A.13(L(\'1Y\',H)+\' \'+L(\'22\',H)+\' \'+L(\'1U\',H),I(e,a){e.1e();F b=e.4w.3U(H.3o.3B.V);8(K a==\'I\')a.1z($19,C[b]);J C[b]});A.13(L(\'6c\',H,O),I(e,a,b,c){e.1e();J A.1A(L(\'4v\',H),[a,b,c])});A.13(L(\'4v\',H),I(e,a,b,c){e.1e();F d=O;8(K a==\'I\'){a.1z($19,7)}Q 8(K a==\'1k\'){2y=$.26(M,{},2y,a);8(b!==O)d=M;Q 7=$.26(M,{},7,a)}Q 8(K a!=\'1y\'){8(K b==\'I\'){F f=46(\'7.\'+a);8(K f==\'1y\')f=\'\';b.1z($19,f)}Q 8(K b!=\'1y\'){8(K c!==\'1r\')c=M;46(\'2y.\'+a+\' = b\');8(c!==O)d=M;Q 46(\'7.\'+a+\' = b\')}Q{J 46(\'7.\'+a)}}8(d){1M(A.11(),7);A.44(2y);A.4Q();F g=3L(A,7,O);A.X(L(\'2B\',H),[M,g])}J 7});A.13(L(\'4O\',H),I(e,a,b){e.1e();8(K a==\'1y\'||a.V==0)a=$(\'6M\');Q 8(K a==\'1l\')a=$(a);8(K a!=\'1k\')J 1c(H,\'2b a 4q 1k.\');8(K b!=\'1l\'||b.V==0)b=\'a.6g\';a.6O(b).1P(I(){F h=1i.6h||\'\';8(h.V>0&&A.11().6j($(h))!=-1){$(1i).21(\'4S\').4S(I(e){e.25();A.X(L(\'2W\',H),h)})}});J M});A.13(L(\'2B\',H),I(e,b,c){e.1e();8(!7.1b.1C)J;8(b){F d=7.1b.G||7.G.P,l=1O.2O(N.U/d);8(7.1b.34){7.1b.1C.11().1J();7.1b.1C.1P(I(){1o(F a=0;a<l;a++){F i=A.11().1L(3u(a*d,0,M,N,A));$(1i).65(7.1b.34(a+1,i))}})}7.1b.1C.1P(I(){$(1i).11().21(7.1b.3i).1P(I(a){$(1i).13(7.1b.3i,I(e){e.25();A.X(L(\'2W\',H),[a*d,0,M,7.1b])})})})}7.1b.1C.1P(I(){$(1i).11().2v(2l(\'5s\',H)).1L(A.1A(L(\'3Q\',H))).31(2l(\'5s\',H))});J M});A.13(L(\'4M\',H),I(e){F a=A.11(),3D=7.G.P;8(7.G.12.1d)3D=2J(a,7,0);Q 8(7.G.1v!=\'*\')3D=3R(a,7,0);8(!7.1N&&N.Z!=0&&3D>N.Z){8(7.G.12.1d){F b=47(a,7,N.Z)-N.Z}Q 8(7.G.1v!=\'*\'){F b=5u(a,7,N.Z)-N.Z}Q{b=7.G.P-N.Z}1c(H,\'77 78-1N: 79 \'+b+\' G 4X.\');A.X(\'17\',b)}7.G.P=2N(3D,7,7.G.12.2p,$19);J 3L(A,7)});A.13(L(\'68\',H,O),I(e,a){e.1e();A.X(L(\'5v\',H),a);J M});A.13(L(\'5v\',H),I(e,a){e.1e();1F=3d(1F);A.1q(\'4t\',O);A.X(L(\'4I\',H));8(a){A.X(L(\'5J\',H))}8(7.1t){1M(A.11(),7)}A.16(A.1q(\'5V\'));A.4L();A.4W();$1D.7f(A);J M})};A.4L=I(){A.21(L(\'\',H));A.21(L(\'\',H,O))};A.4Q=I(){A.4W();3M(7,N.U,H);2T(7,N.Z,H);8(7.T.2m){F c=3m(7.T.2m);$1D.13(L(\'4k\',H,O),I(){A.X(L(\'2X\',H),c)}).13(L(\'4h\',H,O),I(){A.X(L(\'2H\',H))})}8(7.T.Y){7.T.Y.13(L(7.T.3i,H,O),I(e){e.25();F a=O,c=2c;8(C.1Y){a=\'1G\'}Q 8(7.T.3W){a=\'2X\';c=3m(7.T.3W)}8(a){A.X(L(a,H),c)}})}8(7.17.Y){7.17.Y.13(L(7.17.3i,H,O),I(e){e.25();A.X(L(\'17\',H))});8(7.17.2m){F c=3m(7.17.2m);7.17.Y.13(L(\'4k\',H,O),I(){A.X(L(\'2X\',H),c)}).13(L(\'4h\',H,O),I(){A.X(L(\'2H\',H))})}}8(7.1a.Y){7.1a.Y.13(L(7.1a.3i,H,O),I(e){e.25();A.X(L(\'1a\',H))});8(7.1a.2m){F c=3m(7.1a.2m);7.1a.Y.13(L(\'4k\',H,O),I(){A.X(L(\'2X\',H),c)}).13(L(\'4h\',H,O),I(){A.X(L(\'2H\',H))})}}8($.1R.2A){8(7.17.2A){8(!C.51){C.51=M;$1D.2A(I(e,a){8(a>0){e.25();F b=52(7.17.2A);A.X(L(\'17\',H),b)}})}}8(7.1a.2A){8(!C.53){C.53=M;$1D.2A(I(e,a){8(a<0){e.25();F b=52(7.1a.2A);A.X(L(\'1a\',H),b)}})}}}8($.1R.3A){F d=(7.17.54)?I(){A.X(L(\'17\',H))}:2c,3y=(7.1a.54)?I(){A.X(L(\'1a\',H))}:2c;8(3y||3y){8(!C.3A){C.3A=M;F f={\'7x\':30,\'7A\':30,\'7C\':M};1x(7.2r){W\'4E\':W\'5H\':f.7N=3y;f.7O=d;18;2z:f.7Q=3y;f.6v=d}$1D.3A(f)}}}8(7.1b.1C){8(7.1b.2m){F c=3m(7.1b.2m);7.1b.1C.13(L(\'4k\',H,O),I(){A.X(L(\'2X\',H),c)}).13(L(\'4h\',H,O),I(){A.X(L(\'2H\',H))})}}8(7.17.2w||7.1a.2w){$(3I).13(L(\'5K\',H,O,M,M),I(e){F k=e.5L;8(k==7.1a.2w){e.25();A.X(L(\'1a\',H))}8(k==7.17.2w){e.25();A.X(L(\'17\',H))}})}8(7.1b.48){$(3I).13(L(\'5K\',H,O,M,M),I(e){F k=e.5L;8(k>=49&&k<58){k=(k-49)*7.G.P;8(k<=N.U){e.25();A.X(L(\'2W\',H),[k,0,M,7.1b])}}})}8(7.T.1G){A.X(L(\'1G\',H),7.T.56)}8(C.4A){$(3t).13(L(\'6C\',H,O,M,M),I(e){A.X(L(\'4I\',H));8(7.T.55&&!C.1Y){A.X(L(\'1G\',H))}1M(A.11(),7);A.44(2y);F a=3L(A,7,O);A.X(L(\'2B\',H),[M,a])})}};A.4W=I(){F a=L(\'\',H),3s=L(\'\',H,O);57=L(\'\',H,O,M,M);$(3I).21(57);$(3t).21(57);$1D.21(3s);8(7.T.Y)7.T.Y.21(3s);8(7.17.Y)7.17.Y.21(3s);8(7.1a.Y)7.1a.Y.21(3s);8(7.1b.1C){7.1b.1C.21(3s);8(7.1b.34){7.1b.1C.11().1J()}}3M(7,\'3f\',H);2T(7,\'2v\',H)};F C={\'2r\':\'1a\',\'1Y\':M,\'1U\':O,\'22\':O,\'53\':O,\'51\':O,\'3A\':O},N={\'U\':A.11().V,\'Z\':0},1F={\'6F\':2c,\'T\':2c,\'3k\':2c,\'2Q\':2C(),\'3v\':0},R={\'22\':O,\'1j\':0,\'2Q\':0,\'1I\':\'\',\'1f\':[]},1X={\'2a\':[],\'24\':[]},1S=[],H=$.26(M,{},$.1R.1K.5P,z),7={},2y=y,$1D=A.6H(\'<\'+H.59.4C+\' 6J="\'+H.59.5R+\'" />\').3e();H.3Y=A.3Y;H.45=$.1R.1K.45++;A.44(2y,M,B);A.5t();A.5S();A.4Q();8(2V(7.G.2K)){F D=7.G.2K}Q{F D=[];8(7.G.2K!=0){D.1n(7.G.2K)}}8(7.2t){D.6N(5U(7.2t))}8(D.V>0){1o(F a=0,l=D.V;a<l;a++){F s=D[a];8(s==0){5b}8(s===M){s=3t.6P.6h;8(s.V<1){5b}}Q 8(s===\'5W\'){s=1O.35(1O.5W()*N.U)}8(A.1A(L(\'2W\',H),[s,0,M,{1H:\'4g\'}])){18}}}F E=3L(A,7,O),5Y=3p(A.11(),7);8(7.5Z){7.5Z.1z($19,5Y,E)}A.X(L(\'2B\',H),[M,E]);A.X(L(\'4O\',H));J A};$.1R.1K.45=1;$.1R.1K.4x={\'2j\':O,\'3h\':M,\'1N\':M,\'2L\':O,\'2r\':\'1s\',\'G\':{\'2K\':0},\'1m\':{\'1I\':\'6U\',\'1j\':5N,\'2m\':O,\'2A\':O,\'54\':O,\'3i\':\'4S\',\'3k\':O}};$.1R.1K.5P={\'1c\':O,\'3o\':{\'3B\':\'\',\'60\':\'6W\'},\'59\':{\'4C\':\'6X\',\'5R\':\'6Y\'},\'5c\':{}};$.1R.1K.5M=I(a,b){J\'<a 70="#"><62>\'+a+\'</62></a>\'};I 20(d,e){J{1f:[],1j:d,4B:d,1I:e,2Q:2C()}}I 2f(s){8(K s.1p==\'1k\'){2f(s.1p)}1o(F a=0,l=s.1f.V;a<l;a++){F b=s.1f[a];8(!b)5b;8(b[3])b[0].4J();b[0].63(b[1],{64:b[2],1j:s.1j,1I:s.1I})}8(K s.1Q==\'1k\'){2f(s.1Q)}}I 3P(s,c){8(K c!=\'1r\')c=M;8(K s.1p==\'1k\'){3P(s.1p,c)}1o(F a=0,l=s.1f.V;a<l;a++){F b=s.1f[a];b[0].4J(M);8(c){b[0].16(b[1]);8(K b[2]==\'I\')b[2]()}}8(K s.1Q==\'1k\'){3P(s.1Q,c)}}I 3d(t){8(t.T)74(t.T);J t}I 3z(b,t,c){8(b.V){1o(F a=0,l=b.V;a<l;a++){b[a].3E(t,c)}}J[]}I 75(a,c,x,d,f){F o={\'1j\':d,\'1I\':a.1I};8(K f==\'I\')o.64=f;c.63({2g:x},o)}I 4y(a,b,c,o,d){F e=2E(4G(b.11(),o),o,M)[0],5d=2E(c.11(),o,M)[0],41=(d)?-5d:e,2D={},3l={};2D[o.d[\'S\']]=5d;2D[o.d[\'1s\']]=41;3l[o.d[\'1s\']]=0;a.1p.1f.1n([b,{\'2g\':1}]);a.1Q.1f.1n([c,3l,I(){$(1i).1J()}]);c.16(2D);J a}I 4z(a,b,c,o,d,n){F e=2E(4H(b.11(),o,n),o,M)[0],5f=2E(c.11(),o,M)[0],41=(d)?-5f:e,2D={},3l={};2D[o.d[\'S\']]=5f;2D[o.d[\'1s\']]=0;3l[o.d[\'1s\']]=41;a.1Q.1f.1n([c,3l,I(){$(1i).1J()}]);c.16(2D);J a}I 3M(o,t,c){8(t==\'3j\'||t==\'3f\'){F f=t}Q 8(o.G.3r>=t){1c(c,\'2b 5F G: 7b 7c (\'+t+\' G, \'+o.G.3r+\' 5E).\');F f=\'3f\'}Q{F f=\'3j\'}F s=(f==\'3j\')?\'2v\':\'31\',h=2l(\'2P\',c);8(o.T.Y)o.T.Y[f]()[s](h);8(o.17.Y)o.17.Y[f]()[s](h);8(o.1a.Y)o.1a.Y[f]()[s](h);8(o.1b.1C)o.1b.1C[f]()[s](h)}I 2T(o,f,c){8(o.1N||o.3h)J;F a=(f==\'2v\'||f==\'31\')?f:O,4o=2l(\'7e\',c);8(o.T.Y&&a){o.T.Y[a](4o)}8(o.17.Y){F b=a||(f==0)?\'31\':\'2v\';o.17.Y[b](4o)}8(o.1a.Y){F b=a||(f==o.G.P)?\'31\':\'2v\';o.1a.Y[b](4o)}}I 4p(a,b){8(K b==\'I\')b=b.1z(a);8(K b==\'1y\')b={};J b}I 3w(a,b,c){8(K c!=\'1l\')c=\'\';b=4p(a,b);8(K b==\'1l\'){F d=5h(b);8(d==-1)b=$(b);Q b=d}8(c==\'1b\'){8(K b==\'1r\')b={\'48\':b};8(K b.3b!=\'1y\')b={\'1C\':b};8(K b.1C==\'I\')b.1C=b.1C.1z(a);8(K b.1C==\'1l\')b.1C=$(b.1C);8(K b.G!=\'14\')b.G=O}Q 8(c==\'T\'){8(K b.3b!=\'1y\')b={\'Y\':b};8(K b==\'1r\')b={\'1G\':b};8(K b==\'14\')b={\'3q\':b};8(K b.Y==\'I\')b.Y=b.Y.1z(a);8(K b.Y==\'1l\')b.Y=$(b.Y)}Q{8(K b.3b!=\'1y\')b={\'Y\':b};8(K b==\'14\')b={\'2w\':b};8(K b.Y==\'I\')b.Y=b.Y.1z(a);8(K b.Y==\'1l\')b.Y=$(b.Y);8(K b.2w==\'1l\')b.2w=5h(b.2w)}J b}I 3u(a,b,c,d,e){8(K a==\'1l\'){8(2s(a))a=$(a);Q a=2o(a)}8(K a==\'1k\'){8(K a.3b==\'1y\')a=$(a);a=e.11().6j(a);8(a==-1)a=0;8(K c!=\'1r\')c=O}Q{8(K c!=\'1r\')c=M}8(2s(a))a=0;Q a=2o(a);8(2s(b))b=0;Q b=2o(b);8(c){a+=d.Z}a+=b;8(d.U>0){1Z(a>=d.U){a-=d.U}1Z(a<0){a+=d.U}}J a}I 47(i,o,s){F t=0,x=0;1o(F a=s;a>=0;a--){F j=i.1L(a);t+=(j.1W(\':P\'))?j[o.d[\'27\']](M):0;8(t>o.3S)J x;8(a==0)a=i.V;x++}}I 5u(i,o,s){J 5i(i,o.G.1v,o.G.12.4c,s)}I 6t(i,o,s,m){J 5i(i,o.G.1v,m,s)}I 5i(i,f,m,s){F t=0,x=0;1o(F a=s,l=i.V-1;a>=0;a--){x++;8(x==l)J x;F j=i.1L(a);8(j.1W(f)){t++;8(t==m)J x}8(a==0)a=i.V}}I 4V(a,o){J o.G.12.4c||a.11().1g(0,o.G.P).1v(o.G.1v).V}I 2J(i,o,s){F t=0,x=0;1o(F a=s,l=i.V-1;a<=l;a++){F j=i.1L(a);t+=(j.1W(\':P\'))?j[o.d[\'27\']](M):0;8(t>o.3S)J x;x++;8(x==l)J x;8(a==l)a=-1}}I 4F(i,o,s,l){F v=2J(i,o,s);8(!o.1N){8(s+v>l)v=l-s}J v}I 3R(i,o,s){J 5j(i,o.G.1v,o.G.12.4c,s,o.1N)}I 5w(i,o,s,m){J 5j(i,o.G.1v,m+1,s,o.1N)-1}I 5j(i,f,m,s,c){F t=0,x=0;1o(F a=s,l=i.V-1;a<=l;a++){x++;8(x==l)J x;F j=i.1L(a);8(j.1W(f)){t++;8(t==m)J x}8(a==l)a=-1}}I 3p(i,o){J i.1g(0,o.G.P)}I 6l(i,o,n){J i.1g(n,o.G.12.2q+n)}I 6b(i,o){J i.1g(0,o.G.P)}I 4G(i,o){J i.1g(0,o.G.12.2q)}I 4H(i,o,n){J i.1g(n,o.G.P+n)}I 1M(i,o,m){F x=(K m==\'1r\')?m:O;8(K m!=\'14\')m=0;i.1P(I(){F j=$(1i);F t=2o(j.16(o.d[\'1E\']));8(2s(t))t=0;j.1q(\'6f\',t);j.16(o.d[\'1E\'],((x)?j.1q(\'6f\'):m+j.1q(\'1V\')))})}I 3L(a,o,p){F b=a.3e(),$i=a.11(),$v=3p($i,o),42=4a(2E($v,o,M),o,p);b.16(42);8(o.1t){F p=o.1h,r=p[o.d[1]];8(o.1B){8(r<0)r=0}F c=$v.2I();c.16(o.d[\'1E\'],c.1q(\'1V\')+r);a.16(o.d[\'32\'],p[o.d[0]]);a.16(o.d[\'1s\'],p[o.d[3]])}a.16(o.d[\'S\'],42[o.d[\'S\']]+(36($i,o,\'S\')*2));a.16(o.d[\'1u\'],5l($i,o,\'1u\'));J 42}I 2E(i,o,a){F b=36(i,o,\'S\',a),6i=5l(i,o,\'1u\',a);J[b,6i]}I 5l(i,o,a,b){8(K b!=\'1r\')b=O;8(K o[o.d[a]]==\'14\'&&b)J o[o.d[a]];8(K o.G[o.d[a]]==\'14\')J o.G[o.d[a]];F c=(a.5m().2S(\'S\')>-1)?\'27\':\'2Z\';J 3C(i,o,c)}I 3C(i,o,b){F s=0;1o(F a=0,l=i.V;a<l;a++){F j=i.1L(a);F m=(j.1W(\':P\'))?j[o.d[b]](M):0;8(s<m)s=m}J s}I 3g(b,o,c){8(!b.1W(\':P\'))J 0;F d=b[o.d[c]](),5n=(o.d[c].5m().2S(\'S\')>-1)?[\'7p\',\'7q\']:[\'7r\',\'7s\'];1o(F a=0,l=5n.V;a<l;a++){F m=2o(b.16(5n[a]));d-=(2s(m))?0:m}J d}I 36(i,o,b,c){8(K c!=\'1r\')c=O;8(K o[o.d[b]]==\'14\'&&c)J o[o.d[b]];8(K o.G[o.d[b]]==\'14\')J o.G[o.d[b]]*i.V;F d=(b.5m().2S(\'S\')>-1)?\'27\':\'2Z\',s=0;1o(F a=0,l=i.V;a<l;a++){F j=i.1L(a);s+=(j.1W(\':P\'))?j[o.d[d]](M):0}J s}I 5p(i,o,b){F s=O,v=O;1o(F a=0,l=i.V;a<l;a++){F j=i.1L(a);F c=(j.1W(\':P\'))?j[o.d[b]](M):0;8(s===O)s=c;Q 8(s!=c)v=M;8(s==0)v=M}J v}I 66(i,o,d){J i[o.d[\'7t\'+d]](M)-3g(i,o,\'7u\'+d)}I 4n(x){J(K x==\'1l\'&&x.3U(-1)==\'%\')}I 3Z(s,o){8(4n(o)){o=o.5o(0,o.V-1);8(2s(o))J s;s*=o/3F}J s}I L(n,c,a,b,d){8(K a!=\'1r\')a=M;8(K b!=\'1r\')b=M;8(K d!=\'1r\')d=O;8(a)n=c.3o.3B+n;8(b)n=n+\'.\'+c.3o.60;8(b&&d)n+=c.45;J n}I 2l(n,c){J(K c.5c[n]==\'1l\')?c.5c[n]:n}I 4a(a,o,p){8(K p!=\'1r\')p=M;F b=(o.1t&&p)?o.1h:[0,0,0,0];F c={};c[o.d[\'S\']]=a[0]+b[1]+b[3];c[o.d[\'1u\']]=a[1]+b[0]+b[2];J c}I 2Y(c,d){F e=[];1o(F a=0,6n=c.V;a<6n;a++){1o(F b=0,6o=d.V;b<6o;b++){8(d[b].2S(K c[a])>-1&&K e[b]==\'1y\'){e[b]=c[a];18}}}J e}I 5T(p){8(K p==\'1y\')J[0,0,0,0];8(K p==\'14\')J[p,p,p,p];Q 8(K p==\'1l\')p=p.3a(\'7z\').6q(\'\').3a(\'7B\').6q(\'\').3a(\' \');8(!2V(p)){J[0,0,0,0]}1o(F i=0;i<4;i++){p[i]=2o(p[i])}1x(p.V){W 0:J[0,0,0,0];W 1:J[p[0],p[0],p[0],p[0]];W 2:J[p[0],p[1],p[0],p[1]];W 3:J[p[0],p[1],p[2],p[1]];2z:J[p[0],p[1],p[2],p[3]]}}I 4l(a,o){F x=(K o[o.d[\'S\']]==\'14\')?1O.2O(o[o.d[\'S\']]-36(a,o,\'S\')):0;1x(o.1B){W\'1s\':J[0,x];W\'2U\':J[x,0];W\'5r\':2z:J[1O.2O(x/2),1O.35(x/2)]}}I 4b(x,o,a,b){F v=x;8(K a==\'I\'){v=a.1z(b,v)}Q 8(K a==\'1l\'){F p=a.3a(\'+\'),m=a.3a(\'-\');8(m.V>p.V){F c=M,5q=m[0],2F=m[1]}Q{F c=O,5q=p[0],2F=p[1]}1x(5q){W\'7E\':v=(x%2==1)?x-1:x;18;W\'7F\':v=(x%2==0)?x-1:x;18;2z:v=x;18}2F=2o(2F);8(!2s(2F)){8(c)2F=-2F;v+=2F}}8(K v!=\'14\')v=1;8(v<1)v=1;J v}I 2N(x,o,a,b){J 5k(4b(x,o,a,b),o.G.12)}I 5k(v,i){8(K i.2M==\'14\'&&v<i.2M)v=i.2M;8(K i.2i==\'14\'&&v>i.2i)v=i.2i;8(v<1)v=1;J v}I 4Z(s){8(!2V(s))s=[[s]];8(!2V(s[0]))s=[s];1o(F j=0,l=s.V;j<l;j++){8(K s[j][0]==\'1l\')s[j][0]=$(s[j][0]);8(K s[j][1]!=\'1r\')s[j][1]=M;8(K s[j][2]!=\'1r\')s[j][2]=M;8(K s[j][3]!=\'14\')s[j][3]=0}J s}I 5h(k){8(k==\'2U\')J 39;8(k==\'1s\')J 37;8(k==\'4E\')J 38;8(k==\'5H\')J 40;J-1}I 4D(n,v){8(n)3I.2t=n+\'=\'+v+\'; 7G=/\'}I 5U(n){n+=\'=\';F b=3I.2t.3a(\';\');1o(F a=0,l=b.V;a<l;a++){F c=b[a];1Z(c.7H(0)==\' \'){c=c.5o(1,c.V)}8(c.2S(n)==0){J c.5o(n.V,c.V)}}J 0}I 3m(p){8(p&&K p==\'1l\'){F i=(p.2S(\'7I\')>-1)?M:O,r=(p.2S(\'2H\')>-1)?M:O}Q{F i=r=O}J[i,r]}I 52(a){J(K a==\'14\')?a:2c}I 2V(a){J K(a)==\'1k\'&&(a 7J 7K)}I 2C(){J 7L 7M().2C()}I 1c(d,m){8(K d==\'1k\'){F s=\' (\'+d.3Y+\')\';d=d.1c}Q{F s=\'\'}8(!d)J O;8(K m==\'1l\')m=\'1K\'+s+\': \'+m;Q m=[\'1K\'+s+\':\',m];8(3t.4r&&3t.4r.6u)3t.4r.6u(m);J O}$.1R.6g=I(o,c){J 1i.1K(o,c)};$.26($.1I,{\'7P\':I(t){F a=t*t;J t*(-a*t+4*a-6*t+4)},\'7R\':I(t){J t*(4*t*t-9*t+6)},\'7S\':I(t){F a=t*t;J t*(33*a*a-7T*a*t+7U*a-67*t+15)}})})(7V);',62,492,'|||||||opts|if|||||||||||||||||||||||||||||||||var|items|conf|function|return|typeof|cf_e|true|itms|false|visible|else|scrl|width|auto|total|length|case|trigger|button|first||children|visibleConf|bind|number||css|prev|break|tt0|next|pagination|debug|variable|stopPropagation|anims|slice|padding|this|duration|object|string|scroll|push|for|pre|data|boolean|left|usePadding|height|filter|a_dur|switch|undefined|call|triggerHandler|align|container|wrp|marginRight|tmrs|play|fx|easing|remove|carouFredSel|eq|sz_resetMargin|circular|Math|each|post|fn|queu|c_new|isScrolling|cfs_origCssMargin|is|clbk|isPaused|while|sc_setScroll|unbind|isStopped|stopImmediatePropagation|onAfter|preventDefault|extend|outerWidth|l_cur|w_siz|onBefore|Not|null|l_old|crossfade|sc_startScroll|opacity|uncover|max|synchronise|pR|cf_c|pauseOnHover|c_old|parseInt|adjust|old|direction|isNaN|cookie|fade|removeClass|key|l_new|opts_orig|default|mousewheel|updatePageStatus|getTime|css_o|ms_getSizes|adj|cover|resume|last|gn_getVisibleItemsNext|start|responsive|min|cf_getItemsAdjust|ceil|hidden|startTime|scrolling|indexOf|nv_enableNavi|right|is_array|slideTo|pause|cf_sortParams|outerHeight||addClass|top||anchorBuilder|floor|ms_getTotalSize||||split|jquery|innerWidth|sc_clearTimers|parent|hide|ms_getTrueInnerSize|infinite|event|show|queue|ani_o|bt_pauseOnHoverConfig|Carousel|events|gi_getCurrentItems|pauseDuration|minimum|ns2|window|gn_getItemIndex|timePassed|go_getNaviObject|dur2|wN|sc_callCallbacks|touchwipe|prefix|ms_getTrueLargestSize|vI|apply|100|perc|currentPosition|document|to|position|sz_setSizes|nv_showNavi|before|appendTo|sc_stopScroll|currentPage|gn_getVisibleItemsNextFilter|maxDimention|of|substr|marginBottom|pauseOnEvent|get|selector|ms_getPercentage||cur_l|sz|stopped|_cfs_init|serialNumber|eval|gn_getVisibleItemsPrev|keys||cf_mapWrapperSizes|cf_getAdjust|org|onEnd|end|clone|none|mouseleave|Number|isHidden|mouseenter|cf_getAlignPadding|orgW|ms_isPercentage|di|go_getObject|valid|console|not|cfs_isCarousel|conditions|configuration|type|defaults|fx_cover|fx_uncover|upDateOnWindowResize|orgDuration|element|cf_setCookie|up|gn_getVisibleItemsNextTestCircular|gi_getOldItemsNext|gi_getNewItemsNext|finish|stop|slideToPage|_cfs_unbind_events|updateSizes|absolute|linkAnchors|marginLeft|_cfs_bind_buttons|marginTop|click|float|textAlign|gn_getVisibleOrg|_cfs_unbind_buttons|backward|scrolled|cf_getSynchArr||mousewheelPrev|bt_mousesheelNumber|mousewheelNext|wipe|pauseOnResize|delay|ns3||wrapper|bottom|continue|classnames|new_w|nw|old_w|seco|cf_getKeyCode|gn_getItemsPrevFilter|gn_getItemsNextFilter|cf_getItemAdjustMinMax|ms_getLargestSize|toLowerCase|arr|substring|ms_hasVariableSizes|sta|center|selected|_cfs_build|gn_getVisibleItemsPrevFilter|destroy|gn_getScrollItemsNextFilter|forward|page|directscroll|Item|the|new_m|innerHeight|needed|enough|dx|down|onPauseStart|jumpToStart|keyup|keyCode|pageAnchorBuilder|500|No|configs|onPauseEnd|classname|_cfs_bind_events|cf_getPadding|cf_readCookie|cfs_origCss|random|fixed|itm|onCreate|namespace|after|span|animate|complete|append|ms_getPaddingBorderMargin||_cfs_destroy|secp|_cfs_currentPosition|gi_getNewItemsPrev|_cfs_configuration|onPausePause|concat|cfs_tempCssMargin|caroufredsel|hash|s2|index|Set|gi_getOldItemsPrev|Scrolling|l1|l2|shift|join|_cfs_slide_|paused|gn_getScrollItemsPrevFilter|log|wipeRight|The|found|Callback|returned|automatically|second|resize|removeItem|round|timer|currentVisible|wrap|or|class|_cfs_slide_prev|attr|body|unshift|find|location|id|moved|relative|overflow|swing|_cfs_slide_next|cfs|div|caroufredsel_wrapper|Infinity|href|Available|Width|be|clearTimeout|fx_fade|widths|Preventing|non|sliding|setTimeout|hiding|navigation|should|disabled|replaceWith|prependTo|prevPage|heights|Page|nextPage|2500|prepend|carousel|resumed|paddingLeft|paddingRight|paddingTop|paddingBottom|outer|inner|option|insertItem|min_move_x|currently|px|min_move_y|em|preventDefaultEvents|caroufredsel_cookie_|even|odd|path|charAt|immediate|instanceof|Array|new|Date|wipeUp|wipeDown|quadratic|wipeLeft|cubic|elastic|106|126|jQuery'.split('|'),0,{}))

/*
 * FancyBox - jQuery Plugin
 * Simple and fancy lightbox alternative
 *
 * Examples and documentation at: http://fancybox.net
 * 
 * Copyright (c) 2008 - 2010 Janis Skarnelis
 * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
 * 
 * Version: 1.3.4 (11/11/2010)
 * Requires: jQuery v1.3+
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);

/* idTabs ~ Sean Catchpole - Version 2.2 - MIT/GPL */
(function(){var dep={"jQuery":"http://code.jquery.com/jquery-latest.min.js"};var init=function(){(function($){$.fn.idTabs=function(){var s={};for(var i=0;i<arguments.length;++i){var a=arguments[i];switch(a.constructor){case Object:$.extend(s,a);break;case Boolean:s.change=a;break;case Number:s.start=a;break;case Function:s.click=a;break;case String:if(a.charAt(0)=='.')s.selected=a;else if(a.charAt(0)=='!')s.event=a;else s.start=a;break;}}
if(typeof s['return']=="function")
s.change=s['return'];return this.each(function(){$.idTabs(this,s);});}
$.idTabs=function(tabs,options){var meta=($.metadata)?$(tabs).metadata():{};var s=$.extend({},$.idTabs.settings,meta,options);if(s.selected.charAt(0)=='.')s.selected=s.selected.substr(1);if(s.event.charAt(0)=='!')s.event=s.event.substr(1);if(s.start==null)s.start=-1;var showId=function(){if($(this).is('.'+s.selected))
return s.change;var id="#"+this.href.split('#')[1];var aList=[];var idList=[];$("a",tabs).each(function(){if(this.href.match(/#/)){aList.push(this);idList.push("#"+this.href.split('#')[1]);}});if(s.click&&!s.click.apply(this,[id,idList,tabs,s]))return s.change;for(i in aList)$(aList[i]).removeClass(s.selected);for(i in idList)$(idList[i]).hide();$(this).addClass(s.selected);$(id).show();return s.change;}
var list=$("a[href*='#']",tabs).unbind(s.event,showId).bind(s.event,showId);list.each(function(){$("#"+this.href.split('#')[1]).hide();});var test=false;if((test=list.filter('.'+s.selected)).length);else if(typeof s.start=="number"&&(test=list.eq(s.start)).length);else if(typeof s.start=="string"&&(test=list.filter("[href*='#"+s.start+"']")).length);if(test){test.removeClass(s.selected);test.trigger(s.event);}
return s;}
$.idTabs.settings={start:0,change:false,click:null,selected:".selected",event:"!click"};$.idTabs.version="2.2";$(function(){$(".idTabs").idTabs();});})(jQuery);}
var check=function(o,s){s=s.split('.');while(o&&s.length)o=o[s.shift()];return o;}
var head=document.getElementsByTagName("head")[0];var add=function(url){var s=document.createElement("script");s.type="text/javascript";s.src=url;head.appendChild(s);}
var s=document.getElementsByTagName('script');var src=s[s.length-1].src;var ok=true;for(d in dep){if(check(this,d))continue;ok=false;add(dep[d]);}if(ok)return init();add(src);})();
function updateField(id,val){
    $("#rc_"+id).val(val);
}
function updateOrderDetail(id){
    $("#"+id).removeAttr('disabled');
}
var i = 0;
function remove_parent(obj)
            {
                $(obj).parent().remove();
                i--
            }
$(document).ready(function()
{
    $("#callBMR").click(function(){
        calBMR();
    })
    $("#eohong").click(function(){
       calHip(); 
    });
    $("#callBMI").click(function(){
       calBMI(); 
    });
    $("#bdfat").click(function(){
       calBDFAT(); 
    });
    
    $("#foo3 img").click(function(){
        var youtube =$(this).attr("rel");
        $("#display_video").html('<iframe width="305" height="200" src="http://www.youtube.com/embed/'+youtube+'" frameborder="0" allowfullscreen></iframe>'); 
    });
    $("#foo1").carouFredSel({
        items       : 1,
        direction:'up',
        scroll:{
            duration:1000
        }
    });
    $("#foo3").carouFredSel({
        items       : 3,
        auto:false,
        prev    : {
	        button  : "#foo3_prev",
	        key     : "left"
	    },
	    next    : {
	        button  : "#foo3_next",
	        key     : "right"
	    },
        
        
    });
    $("#foo2").carouFredSel({
        items       : 1,
        direction:'down',
        scroll:{
            duration:1000
        }
    });
    $("#foo1 a").fancybox({
	    cyclic  : true,
	    onStart : function() {
	        $("#foo1").trigger("pause");
	    },
	    onClosed: function() {
	        $("#foo1").trigger("play");
	    }
	});
     $("#nav ul li a").click(function(){
            var d = $(this).parent().find('ul');
            if(d.length>0) 
                return false;  
        });
    $("#addsize").click(function(){
        $("#options").append('<td><a onclick="" title="Close" class=\"close\">&times;</a><label>Size name:</label><input name="sizeName[]"  type="text" class="input-small" /><label>Quatity:</label><input name="sizeQty[]"  type="text" class="input-small" /></td>');
    });
    $("#nav").find('li').hover(function(){
        $(this).find('ul').slideDown(300);
    }
    ,function(){
        $(this).find('ul').slideUp(300);
    }
    )
    $("#city").change(function(){
        $.ajax({
            url:site_url+'index/shop/get_country/'+$(this).val()
            ,type:'POST'
            ,data:{
                'bw_token':cct
            },success:function(msg){
                if(msg!="")
                    $("#ward").html(msg);
                else
                    $("#ward").html('<option value="">Chưa có quận huyện</option>');
            }
            
        })
    }).change();
    $("#rc_city").change(function(){
        $.ajax({
            url:site_url+'index/shop/get_country/'+$(this).val()
            ,type:'POST'
            ,data:{
                'bw_token':cct
            },success:function(msg){
                if(msg!="")
                    $("#rc_ward").html(msg);
                else
                    $("#rc_ward").html('<option value="">Chưa có quận huyện</option>');
            }
            
        })
    }).change();
    $("#change_profile").click(function(){
        
        $("#change_profile").hide();
        $("#name").removeAttr('disabled');
        $("#birthdate").removeAttr('disabled');
        $("#gender").removeAttr('disabled');
        $("#address").removeAttr('disabled');
        $("#country").removeAttr('disabled');
        $("#favorite").removeAttr('disabled');
        $("#job").removeAttr('disabled');
        $("#company").removeAttr('disabled');
        $("#website").removeAttr('disabled');
        $("#cmnd").removeAttr('disabled');
        $("#yahoo").removeAttr('disabled');
        
        $("#more").removeAttr('disabled');
        $(".login_button").show();
    });
    $("#tabs-right").idTabs(function(id,list,set){ 
	
    $("a",set).removeClass("selected") 
    .filter("[href='"+id+"']",set).addClass("selected"); 
    for(i in list) 
      $(list[i]).hide(); 
    $(id).fadeIn(); 
    return false; 
  }); 
    $(".subitem").hide();
    $(".exp").live('click',function(){
        $(this).parent().find('.subitem').slideDown();
        $(this).parent().find('.imp').show();
        $(this).hide();
    })
    $(".imp").live('click',function(){
        $(this).parent().find('.subitem').slideUp();
        $(this).parent().find('.exp').show();
        $(this).hide();
    })
    $("li.parent").append('<span class=exp>+</span><span class=imp>-</span>')
    $('.item').hover(function(){
			$(this).find('.button').stop().animate({
				right: '5'
				},500);
			$(this).find('.price-button').stop().animate({
				top: '5'
				},500);
								  },function(){
									  $(this).find('.button').stop().animate({
				right: '-120'
				},500);
									  $(this).find('.price-button').stop().animate({
				top: '-75'
				},500);
									  });
    $(".order_detail").click(function(){
        id = $(this).attr('id');
        $(".order_detail_"+id).slideDown(1000);
    })
    $(".order_detail_hide").click(function(){
        id = $(this).attr('id');
        $(".order_detail_"+id).slideUp(1000);
    })
    $("#updateOrderStatus").click(function(){
       updateOrderDetail('status'); 
    });
    $("#status").change(function(){
        $.ajax({
            url:site_url+'administrator/shop/updateOrder/status/'+$(this).val()+'/'+page_id,
            type:"POST",
            data:{
                'bw_token':cct
                },
            success:function(msg){
                alert('Cập nhật đơn hàng thành công');
            }
           })
           
           return false; 
        });
    $("#cancel").click(function(){
        $.ajax({
            url:site_url+'administrator/shop/cancelOrder/'+page_id,
            type:"POST",
            data:{
                'bw_token':cct,
                'reason':$("#post_desc").val()
                },
            success:function(msg){
                if(msg>0){
                    window.location.href=site_url+'administrator/shop/order/detail/'+page_id;
                }else{
                    alert('Đơn hàng này đã bị hủy...bạn không thể hủy nữa')
                }
            }
           })
       return false; 
    });
    $("#payment_status").change(function(){
        $.ajax({
            url:site_url+'administrator/shop/updateOrder/payment_status/'+$(this).val()+'/'+page_id,
            type:"POST",
            data:{
                'bw_token':cct
                },
            success:function(msg){
                alert('Cập nhật đơn hàng thành công')
            }
           })
           
           return false; 
        });
    $("#updatePaymentStatus").click(function(){
        updateOrderDetail('payment_status');
    })
    $(".action").click(function(){
        $("#action").val($(this).attr('title'));
    });
    $("#fullname").change(function(){
       updateField('fullname',$(this).val())
    });
    $("#email").change(function(){
       updateField('email',$(this).val())
    });
    $("#address").change(function(){
       updateField('address',$(this).val())
    });
    $("#tel").change(function(){
       updateField('tel',$(this).val())
    });    
})
    var cct = $.cookie('bw_cookie_token');
    $(".rc").change(function(){
        if($(this).val()==2){
            $(".order_rc").slideDown(1000);
        }else
            $(".order_rc").slideUp(1000);
    }).change();
    
	$(window).load(function() {
	       $(".modal-header").click(function(){
	           $(this).parent().find('.ct').slideToggle(500);
	       })
        $("#submit").click(function(){
           
           if($("#name").val()==''){
                jAlert('Bạn chưa nhập tên');
                return false;
           }
           var flag = check_availble_email($("#email").val());
           if(flag) return false;
           html = '<p><b>'+$("#name").val()+'</b>:'+$("#ct").val()+'</p>';
            
           if($("#ct").val()==''){
                jAlert('Bạn chưa nhập nội dung');
                return false;
           }
           $.ajax({
            url:site_url+'index/shop/comment/add/'+$("#product_id").val(),
            type:"POST",
            data:{
                'bw_token':cct,
                'name':$("#name").val(),
                'email':$("#email").val(),
                'content':$("#ct").val()
                },
            success:function(msg){
                get_comments($("#product_id").val(),msg);
            }
           })
           
           return false; 
        });
        $('#slider').nivoSlider(
        {         
            
        });
        $('.jqzoom').live('mouseover',function(){
           $(this).jqzoom();
        });
        $('.img_thumb li a').live('click',function(){
          
        html='<a class="jqzoom" title="Images" href="'+$(this).attr('href')+'"><img src="'+cdn_url+'/exec/timthumb.php?src='+site_url+$(this).attr(('href'))+'&w=280&z=1" /></a><div class="clear">';
        $('.photo').html(html);
        return false;
        });
        $("#addtocart").click(function(){
            if($("#_size").val()==''){
                jAlert('Bạn chưa chọn size');
                return false;
            }
            else if($("#qty").val()==''){
                jAlert('Bạn chưa chọn số lượng');
                    return false;
            }
            if($("#qty").val()>$("#max_qty").val())
                {
                    jAlert('Sản phẩm này chỉ có '+$("#max_qty").val());
                    return false;
                }
            else if($("#_size").val()=='')
            {
                jAlert('Bạn chưa chọn size');
                    return false;
            }
            else
            {
              $.ajax({
            url:site_url+'index/shop/addToCart',
            type:"POST",
            data:{
                'bw_token':cct,
                'product_id':$("#product_id").val(),
                'qty':$("#qty").val(),
                '_size':$("#_size").val(),
                'colors':$("#colors").val(),
                
                'c_name':$("#c_name").val(),
                'link':$("#link").val(),
                'price':$("#price").val()
                }
            ,success:function(msg){
                $("#items").html(msg);
                $.alerts.okButton = 'Đi tới giỏ hàng';
                $.alerts.cancelButton = 'Tiếp tục mua hàng';
                $("#total_qty").html(msg);
               jConfirm($("#c_name").val()+' đã được cho vào giỏ hàng.','Thông báo',function(r){
                    if(r){
                        window.location = site_url+'shop/checkout/cart.html';
                    }
               });
               
            }
           })  
            }
            
           
          return false; 
        });
        $('.addtowishlist').click(function(){
            addWishlish();
        })
        $('.language').click(function(){
          var id =$(this).attr('id');
          var url = $(this).attr('href');
          $.ajax({
            url:site_url+'index/news/set_language/'+id,
            
            success:function(msg){
                window.location = url;
            }
          }); 
          
          return false;
        });
            $('.product').hover(function(){$(this).find('.cart').stop().animate({right: '15'},500);},function(){$(this).find('.cart').stop().animate({right: '-120'},500);});
           
            $('#colors').change(function(){
                get_colors($(this).val());
                $("#max_qty").val('');
                $('.size li').find('a.active').removeClass('active');
                $("#_size").val('');
                
            }).change();
            $('.size').change(function(){
                
              check_size_available($("#colors").val(),$(this).val());
                           });
            $(".jScrollbar4").jScrollbar();
           
			$("#ratings").stars({
			 cancelShow: false,
             oneVoteOnly: true,
				callback: function(ui, type, value)
				{
					$.ajax({
					   url : site_url + 'index/shop/rate/'+pageid+'/'+value,
                       type:"POST",
                       data:{
                        'bw_token':cct
                        },
                        success:function(msg){
                            if(msg>0)
                                $("#msg").html('Cám ơn bạn đã bình chọn');
                        }
                        
					});
				}
			});
            
    });
    function get_comments(id,time){
        var items = [];
        $.ajax({
            
            url:site_url+'index/shop/loadComment/'+id+'/'+time,
            datatype:'json',
            data:{
                'bw_token':cct
                },
            success:function(data){
                $("#cm").html(data)
            }
        })
    }
    function get_colors(color){
        $('.l_detail').html('Loading...');
        html='<div class="photo">';
        html+='<a class="jqzoom" title="Images" href="'+site_url+options['colors'][color]['images'][0]+'"><img src="'+cdn_url+'/exec/timthumb.php?src='+site_url+options['colors'][color]['images'][0]+'&w=280&z=1" /></a><div class="clear"></div>'
        html+='</div>';
        html+='<ul class="img_thumb">';
        var count = options['colors'][color]['images'].length;
        for(var i =0;i<count;i++){
            html+='<li><a href="/'+options['colors'][color]['images'][i]+'"><img src="'+cdn_url+'exec/timthumb.php?src='+site_url+options['colors'][color]['images'][i]+'&w=60&zc=1"/></a></li>'
        }
        html+='</ul>';
        $('.l_detail').html(html);
    }
    function check_size_available(color,size){
        var _size = options['colors'][color]['size'][size];
        
        if(_size>1){
            $("#max_qty").val(_size);
            $("#_size").val(size);
            $(this).addClass('active');
             return true;
        }else
        {
            $("#max_qty").val('');
            $("#_size").val('');
            jConfirm('Hết hàng','Thông báo');
         return false;   
        }
    }
    function addWishlish(){
        if(is_logged==''){
            var linkReg = site_url+'account/register.html';
            var linkCurr = '<?php echo $this->uri->uri_string(); ?>';
            
            $.alerts.okButton = 'Đăng nhập';
                $.alerts.cancelButton = 'Thoát';
            jConfirm('Vui lòng đăng nhập để Sử dụng chức năng này. Bạn chưa có tài khoản <a href="'+linkReg+'">Đăng ký tại đây</a>','Thông báo',function(r){
                    if(r){
                        window.location.href=site_url+'account/login.html?returnUrl=shop/addwishlist/'+pageid;
                    }
            });
        }else
        {
            $.ajax({
            url:site_url+'shop/addwishlist/'+pageid,
            type:"POST",
            data:{
                'bw_token':cct
            },     
            success:function(msg){
               $.alerts.okButton = 'Đi đến wishlist';
                $.alerts.cancelButton = 'Tiếp tục mua hàng';
               jConfirm('Sản phẩm đã thêm vào wishlist','Thông báo',function(r){
                    if(r){
                        window.location.href=site_url+'account';
                    }
            }); 
            }
          }); 
        }
    }
    function check_availble_email(email){
        var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
        var flag = false
        if(email==''){
            flag = true;
            jAlert('Bạn chưa nhập email','Thông báo');
        }
        else if(!emailReg.test(email)){
            flag = true;
            jAlert('Email không hợp lệ');
        }
        return flag;
        
    }
    
    
    function calBMR() {

        var height = $("#heightbmr").val();
        var weight = $("#weightbmr").val();
        var age = $("#agebmr").val();
        var gender = $("#bmrgender").val();
        var c = $("#cdtl").val();
        
        if (height <= 0) {
         
            $("#heightbmr").focus();
            return false;
        }
        if (weight <= 0) {
            $("#weightbmr").focus();
            return false;
        }
        if (age <= 0) {
            $("#agebmr").focus();
            return false;
        }
        if (gender == null) {
            
            return false;
        }

        var bmr = 0;
        var chuan = "";
        if (gender == 1) {
            chuan = "chuẩn BMR của nam từ 2500 đến 3000";
            bmr = 66 + (13.7 * weight) + (5 * height) - (6.8 * age);
        } else {
            chuan = "chuẩn BMR của nữ từ 2000 đến 2200";
            bmr = 655 + (9.6 * weight) + (1.8 * height) - (4.7 * age);
        }

        $("#bmrresult").html("<h1 class='title'><small>Kết quả : " + bmr * c + " Kcal</small></h1>");
    }
    function calBMI() {
        var chuan = "";
        //( Weight in Kilograms / ( Height in Meters x Height in Meters ) )
        var height = $("#heightbmi").val() / 100;
        var weight = $("#weightbmi").val();
        var h = height * height;
        var result = weight / h;
        if (height <= 0) {
            $("#heightbmi").focus();
            return false;
        }
        if (weight <= 0) {
            $("#weightbmi").focus();
            return false;
        }
        if (result < 18.5)
            chuan = "Ốm";
        else if (result < 25)
            chuan = "Chuẩn";
        else if (result < 30)
            chuan = "Nguy cơ béo phì";
        else if (result < 40)
            chuan = "Béo phì";
        else
            chuan = "Nguy hiểm";
        $("#bmiresult").html("<h1 class='title'><small>Kết quả : " + result + "</small></h1>");
    }
    function calBDFAT() {
        var weight = $("#weightbd").val() * 2.2;
        var waist = $("#waistbd").val() / 2.54;
        var wrist = $("#wristbd").val() / 2.54;
        var hip = $("#hipbd").val() / 2.54;
        var forearm = $("#forearmbd").val() / 2.54;
        var gender = $("#fatgender").val();
        var chuan = "";
        var result = "";
        if (weight <= 0) {
            $("#weightbd").focus();
            return false;
        }
        if (waist <= 0) {
            $("#waistbd").focus();
            return false;
        }
        if (wrist <= 0) {
            $("#wristbd").focus();
            return false;
        }
        if (hip <= 0) {
            $("#hipbd").focus();
            return false;
        }
        if (gender == null) {
           
            return false;
        }
        if (gender == 1) {
            chuan = "chuẩn của nam 15% đến 18%";
            var factor1 = weight * 1.082 + 94.42;
            var factor2 = waist * 4.15;
            var leanbodymass = factor1 - factor2;
            var bodyfatweight = weight - leanbodymass;
            result = (bodyfatweight * 100) / weight;
        } else {
            chuan = "chuẩn của nữ 18% đến 23%";
            var factor1 = weight * 0.732 + 8.987;
            var factor2 = wrist / 3.140;
            var factor3 = waist * 0.157;
            var factor4 = hip * 0.249;
            var factor5 = forearm * 0.434;
            var leanbodymass = factor1 + factor2 - factor3 - factor4 + factor5;
            var bodyfatweight = weight - leanbodymass;
            result = (bodyfatweight * 100) / weight;
        }

        $("#bdresult").html("<h1 class='title'><small>Kết quả : " + result + "%</small></h1>");
    }
    function calHip() {
        var eo = $("#eo").val();
        var hong = $("#hong").val();
        if (eo <= 0) {
            $("#eo").focus();
            return false;
        }
        if (hong <= 0) {
            $("#hong").focus();
            return false;
        }
        var result = 0;
        result = eo / hong;

        $("#hipresult").html("<h1 class='title'><small>Kết quả : " + result + "%</small></h1>");
    }